<!DOCTYPE html>
<html lang="en">
<head>
	<{include file="header.html"}>
	<title>网校管理-<{$user_data['school_name']}>-德安信会计在线教育平台</title>
	<!-- <link href="/static/www/css/default.style.css" type="text/css" rel="stylesheet" /> -->
	<style>
		.h_nav{ background:#1aa3fa; height:66px; border-bottom:1px solid #525252; position:relative;}
		.h_nav li{ float:left; height:65px; line-height:65px; width:125px; position:relative; text-align:center;}
		.h_nav li.curr,.h_nav li:hover{ background:#0393e2}
		.h_nav li:hover .itShowbox{ display:block;}
		.h_nav li.homeCurr{ background:#0393e2; width:267px;}
		.h_nav li.homeCurr .itShowbox{ display:block;}
		.h_nav li a{ color:#fff; display:block; font-size:16px;}
		.h_nav li a i{ margin-left:5px; display:inline-block; vertical-align:middle; border-width:4px; border-style:solid; border-color:#FFF transparent transparent transparent; width:0px; height:0px; font-size:0px;}
		.itShowbox{ display:none; position:absolute; top:65px; z-index:9; background:#0393e2; width:100%;}
		.itShowbox a{ display:block;}
		.itShowbox a:hover{ background:#3faae5;}
		.h_nav li:hover a i{ border-color:transparent transparent #FFF transparent; margin-top:-8px;}
	</style>
</head>
<body>
<div class="wrap">
	<!--star left-->
	<div class="column">
		<{include file="left_menu.html"}>
	</div>
	<div id="ContMianBox">
		<!--star子栏目-->
			<{include file="left_menu_min.html"}>
		<!--end子栏目-->
		
		<!--end left-->
		<div class="container narrow">
		    <!--star conter-->
		    <div class="cetContent">
				<div class="tit p-lr20">
				    <span class="curr">导航设置</span>
				    <!-- <span><a href="/school/info">基本资料</a></span> -->
					<span> <a href="/school/modulars">首页模块设置</a></span>
					<span><a href="/advertising">网校Banner</a></span>
					<span><a href="/school_page">网校页面</a></span>
					<span><a href="/school/wx_pay_config">微信支付设置</a></span>
				</div>
				<!--star内容区域-->
				<div class="mainScroll">
				    <div class="mainContainer line-all">
				        <form class="layui-form" method="post" action="/school/index">
				        	<fieldset class="layui-elem-field" style="padding-top:20px;">
				        	<legend>导航设置</legend>
				        	<{foreach from=$menu_list item=item key=key name=loop}>
				        		<div class="layui-inline">
							  		<div style="width:100%; float:left; padding-bottom:18px;">
								  		<div class="layui-input-block">
									  	<input type="checkbox" jump_url="<{$item.info.url}>" lay-filter="menu" pid="0" indexof="<{$smarty.foreach.loop.index}>" title="<{$item.info.name}>" name="menu[]" <{if empty($item.info.nid) }>checked=""<{/if}> value="<{$item.info.id}>"">
									  	</div>
								  	</div>
							  	</div>
							  	<{if isset($item.sub)}>
							  	<{foreach from=$item.sub item=sub}>
							  	<div class="layui-inline">
							  		<div style="width:100%; float:left; padding-bottom:18px;">
								  		<div class="layui-input-block">
									  	<input type="checkbox" lay-filter="menu" pid="<{$sub.pid}>" indexof="<{$smarty.foreach.loop.index}>" title="<{$sub.name}>" name="menu[]" <{if empty($sub.nid) }>checked=""<{/if}> value="<{$sub.id}>"">
									  	</div>
								  	</div>
							  	</div>
							  	<{/foreach}>
							  	<{/if}>
						  	<{/foreach}>
						  	</fieldset>
						  	<div class="layui-input-block">
								<button class="layui-btn" lay-submit lay-filter="*">保存</button>
							</div>
				        </form>

				        <fieldset class="layui-elem-field layui-field-title" style="margin-top:50px;">
			        	<legend>导航预览</legend>
				        
						</fieldset>
						<div class="h_nav">
							<div class="w1200">
								<ul id="menuul">
									<li menu="home"><a class="curr" href="javascript:;">首页</a></li>
									<{foreach from=$menu_list item=mitem}>
									<li menu_id="<{$mitem.info.id}>" <{if $mitem.info.nid > 0}>style="display:none;"<{/if}>>
										<a href="javascript:;"><{$mitem.info.name}></a>
										<{if isset($mitem.sub)}>
											<div class="itShowbox" style="display: block;">
												<{foreach from=$mitem.sub item=sub_item}>
												<p menu_id="<{$sub_item.id}>" <{if $sub_item.nid > 0}>style="display:none;"<{/if}>><a href="javascript:;"><{$sub_item.name}></a></p>
												<{/foreach}>
											</div>
										<{/if}>
									</li>
									<{/foreach}>
								</ul>
							</div>
						</div>
			        </div>
			    </div>
			</div>
					<!--end内容区域-->
		    <!--end conter-->
		</div>
	</div>
</div>
<{include file="footer.html"}>
<script type="text/javascript">
	layui.use(['form','jquery'], function(){
		var form = layui.form(),$ = layui.jquery;
		form.on('checkbox(menu)', function(data){
			var _this = $(data.elem);
			var menu_id = _this.val();
			var pid = _this.attr("pid");
			var indexof = _this.attr("indexof");
			var menu_text = _this.attr("title");
			var jump_url = _this.attr("jump_url");
			if(pid == 0){
				var menu_elemen = $("#menuul").find("li[menu_id="+menu_id+"]");
			}else{
				var menu_elemen = $("#menuul").find("li[menu_id="+pid+"]").find("p[menu_id="+menu_id+"]");
				
			}
			if(_this.is(':checked')){
				menu_elemen.show();
			}else{
				menu_elemen.hide();
			}
		});
	});
</script>
</body>
</html>
